﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

using System.Data;

/// <summary>
/// Summary description for statistics
/// </summary>
public class statistics
{
	public statistics()
	{
		//
		// TODO: Add constructor logic here
		//
	}

    public static DataTable getCountCandidateTest()
    {
        DataTable tblData = new DataTable();

        ConnectDAL conDal = new ConnectDAL();
        tblData = conDal.getData("Select count(FullName) as CountCandidate From Candidate where ID in (Select CandidateID From Result)");

        return tblData;
    }

    public static DataTable getCountCandidate()
    {
        DataTable tblData = new DataTable();

        ConnectDAL conDal = new ConnectDAL();
        tblData = conDal.getData("Select count(FullName) as CountCandidate From Candidate where ID not in (Select CandidateID From Result)");

        return tblData;
    }

    public static DataTable getCountCategory()
    {
        DataTable tblData = new DataTable();

        ConnectDAL conDal = new ConnectDAL();
        tblData = conDal.getData("select count (ID) as CountCategory From Category");

        return tblData;
    }

    public static DataTable getCountQuestion()
    {
        DataTable tblData = new DataTable();

        ConnectDAL conDal = new ConnectDAL();
        tblData = conDal.getData("select count (ID) as CountQuestion From Question");

        return tblData;
    }

}